﻿namespace XYS.Core.Models
{
    /// <summary>
    /// Api日志记录者配置
    /// </summary>
    public class ApiLoggerSetting
    {

        /// <summary>
        /// 是否启用日志记录
        /// </summary>
        public bool Enable { get; set; } = true;

        /// <summary>
        /// 日志记录通道 类型
        /// </summary>
        public EnumAPILoggerChannelType ChannelType { get; set; }

        /// <summary>
        /// ElasticSearch-配置
        /// </summary>
        public ElasticSearchChannelSetting ElasticSearchSetting { get; set; } = new();


        //如果有其他通道配置 则在此处增加
    }

    /// <summary>
    /// Http日志记录者配置
    /// </summary>
    public class HttpLoggerSetting
    {
        /// <summary>
        /// 日志记录通道 类型
        /// </summary>
        public EnumAPILoggerChannelType ChannelType { get; set; }

        /// <summary>
        /// ElasticSearch-配置
        /// </summary>
        public ElasticSearchChannelSetting ElasticSearchSetting { get; set; }

    }


    /// <summary>
    /// ElasticSearch 通道 配置
    /// </summary>

    public class ElasticSearchChannelSetting
    {
        /// <summary>
        /// es 连接名称
        /// </summary>
        public string ElasticName { get; set; }

        /// <summary>
        /// 索引 名称
        /// </summary>
        public string IndexName { get; set; }

    }

}
